import {ADD} from '../constants'

let defaultState = {
  count: 0,
}
export default function reducers(state = defaultState, action) {
  console.log("state ===> ", state)
  console.log("action ===> ", action)
  switch (action.type) {
    case ADD:
      return {
        ...state,
        count: state.count + action.val
      }
    default:
      return state
  }
  
}